package com.jby.autotest.model;

import java.util.List;

public class Product {
    private Integer id;

    private Integer productId;

    private String productType;

    private String productName;

    private String periodClose;

    private Integer status;

    private String errorMessage;

    private Tender tender;

    private BuyRecord buyRecord;

//    private ProductCalculationInterest productCalculationInterest;


//    private List<Tender> tenderList;
//
//    private List<BuyRecord> buyRecordList;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType == null ? null : productType.trim();
    }

    public String getPeriodClose() {
        return periodClose;
    }

    public void setPeriodClose(String periodClose) {
        this.periodClose = periodClose == null ? null : periodClose.trim();
    }

    public Tender getTender() {
        return tender;
    }

    public void setTender(Tender tender) {
        this.tender = tender;
    }



    public String getBorrowerPhone(){
        if(tender != null) {
            System.out.println("1111111111111111111111111111111111");
            return tender.getBorrowerPhone();
        }
        return null;
    }

    public void setBorrowerPhone(String borrowerPhone){
        if(tender != null) {
            System.out.println("2222222222222222222222222222222222222");
            this.tender.setBorrowerPhone(borrowerPhone);
        }
    }

    public String getTenderTitle(){
        if(tender != null) {
            return tender.getTenderTitle();
        }
        return null;
    }

    public void setTenderTitle(String tenderTitle){
        if(tender != null) {
            this.tender.setTenderTitle(tenderTitle);
        }
    }

//    public String getInvestorPhone(){
//        if(buyRecord != null) {
//            return buyRecord.getInvestorPhone();
//        }
//        return null;
//    }
//
//    public void setInvestorPhone(String investorPhone){
//        this.buyRecord.setInvestorPhone(investorPhone);
//    }

//    public ProductCalculationInterest getProductCalculationInterest() {
//        return productCalculationInterest;
//    }
//
//    public void setProductCalculationInterest(ProductCalculationInterest productCalculationInterest) {
//        this.productCalculationInterest = productCalculationInterest;
//    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public BuyRecord getBuyRecord() {
        return buyRecord;
    }

    public void setBuyRecord(BuyRecord buyRecord) {
        this.buyRecord = buyRecord;
    }

//    public List<Tender> getTenderList() {
//        return tenderList;
//    }
//
//    public void setTenderList(List<Tender> tenderList) {
//        this.tenderList = tenderList;
//    }
//
//    public List<BuyRecord> getBuyRecordList() {
//        return buyRecordList;
//    }
//
//    public void setBuyRecordList(List<BuyRecord> buyRecordList) {
//        this.buyRecordList = buyRecordList;
//    }
}